{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6ecae1f5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Provide a word to search for vowels:aeiu\n",
      "a was found 1 time(s).\n",
      "e was found 1 time(s).\n",
      "i was found 1 time(s).\n",
      "o was found 0 time(s).\n",
      "u was found 1 time(s).\n"
     ]
    }
   ],
   "source": [
    "vowels = ['a','e','i','o','u']\n",
    "word = input(\"Provide a word to search for vowels:\")\n",
    "\n",
    "found = {}\n",
    "\n",
    "found['a'] = 0\n",
    "found['e'] = 0\n",
    "found['i'] = 0\n",
    "found['o'] = 0\n",
    "found['u'] = 0\n",
    "\n",
    "for letter in word:\n",
    "    if letter in vowels:\n",
    "        found[letter] += 1\n",
    "for k, v in sorted(found.items()):\n",
    "    print(k, 'was found', v, 'time(s).')\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f9eeabab",
   "metadata": {},
   "outputs": [],
   "source": [
    "vowels = ['a','e','i','o','u']\n",
    "word = input(\"Provide a word to search for vowels:\")\n",
    "\n",
    "found = {}\n",
    "\n",
    "for letter in word:\n",
    "    if letter in vowels:\n",
    "        found[letter] += 1\n",
    "for k, v in sorted(found.items()):\n",
    "    print(k, 'was found', v, 'time(s).')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "897085a9",
   "metadata": {},
   "outputs": [],
   "source": [
    "fruits = {}\n",
    "fruits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b5f2af2e",
   "metadata": {},
   "outputs": [],
   "source": [
    "fruits['apples'] = 10\n",
    "fruits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "419bc4a3",
   "metadata": {},
   "outputs": [],
   "source": [
    "'apples' in fruits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "082490e8",
   "metadata": {},
   "outputs": [],
   "source": [
    "if 'bananas' in fruits:\n",
    "    fruits['bananas'] += 1  \n",
    "else:\n",
    "    fruits['bananas'] = 1   \n",
    "fruits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0512363f",
   "metadata": {},
   "outputs": [],
   "source": [
    "if 'bananas' in fruits:\n",
    "    fruits['bananas'] += 1  \n",
    "else:\n",
    "    fruits['bananas'] = 1   \n",
    "fruits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7d0391cf",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
